{
 "cells": [
  {
   "cell_type": "code",
   "id": "initial_id",
   "metadata": {
    "collapsed": true
   },
   "source": "import torch",
   "outputs": [],
   "execution_count": null
  },
  {
   "metadata": {},
   "cell_type": "code",
   "source": [
    "in_channels=5\n",
    "out_channels=10\n",
    "width=100\n",
    "height=100\n",
    "kernel_size=3\n",
    "batch_size =1"
   ],
   "id": "43e4eb425620bcf0",
   "outputs": [],
   "execution_count": null
  },
  {
   "metadata": {},
   "cell_type": "code",
   "source": [
    "input=torch.randn(batch_size,in_channels,height,width)\n",
    "conv_layer=torch.nn.Conv2d(in_channels=in_channels,out_channels=out_channels,kernel_size=kernel_size)\n",
    "output=conv_layer(input)"
   ],
   "id": "efd293d027ee94b1",
   "outputs": [],
   "execution_count": null
  },
  {
   "metadata": {},
   "cell_type": "code",
   "source": [
    "print(input.shape)\n",
    "print(output.shape)\n",
    "print(conv_layer.weight.shape)\n",
    "print(conv_layer.bias.shape)"
   ],
   "id": "4d252259e442072e",
   "outputs": [],
   "execution_count": null
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
